package com.zxing.dubbo.interfaces.dto.test;

import lombok.Data;

@Data
public class User {

    private Integer id;
    private String name;
    private String sex;
    private String extra;

    private static int autoCount = 0;

    public User(){}

    public User(boolean autoGenerate){
        if(autoGenerate == true){
            this.id = ++autoCount;
            this.name = "autoGenerate_" + autoCount;
            this.sex = autoCount%2 == 0 ? "female" : "male";
        }
    }
}
